//按要求编写C++或Java程序，封装一个Student类，并实现操作:
//1.学生类属性:“性别”“姓名”“学号”“班级”“年龄”“性格”
//2.学生类方法:“获得班级、“获得学号”、“获得姓名”、“获得性别”、“获得年龄”、“获得性格”和“信息概要”、(即将对象所有属性信息组合成一个有意义的字符9串输出)
//3.创建3个学生类对象，分别输出他们的信息概要;
class Student {
    // 学生的属性
    private String name;
    private String ID;
    private String classes;
    private String gender;
    private String age;
    private String personal;

    // 构造方法，初始化学生对象
    public Student(String name, String ID, String classes, String gender, String age, String personal) {
        this.name = name;
        this.ID = ID;
        this.classes = classes;
        this.gender = gender;
        this.age = age;
        this.personal = personal;
    }

    // 无参构造函数，可以提供默认值
    public Student() {
        this("陈予琛", "3024", "地理信息科学班", "男生", "18岁", "活泼开朗");
    }

    // 获取各个属性的方法
    public String getName() {
        return this.name;
    }

    public String getID() {
        return this.ID;
    }

    public String getClasses() {
        return this.classes;
    }

    public String getGender() {
        return this.gender;
    }

    public String getAge() {
        return this.age;
    }

    public String getPersonal() {
        return this.personal;
    }

    // 输出学生信息的概要
    public void say() {
        System.out.println("姓名：" + this.name + "，学号：" + this.ID + "，班级：" + this.classes + "，性别：" + this.gender + "，年龄：" + this.age + "，性格：" + this.personal);
    }

    // 设置学生的属性
    public void setName(String name) {
        this.name = name;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public void setClasses(String classes) {
        this.classes = classes;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public void setPersonal(String personal) {
        this.personal = personal;
    }

    public static void main(String[] args) {
        // 创建3个学生对象
        Student stu1 = new Student("陈予琛", "3024", "地理信息科学班", "男生", "18岁", "开朗活泼.");
        Student stu2 = new Student("陆晓涵", "3025", "经济管理会计班", "女生", "18岁", "温柔内向.");
        Student stu3 = new Student("李晨山", "3002", "地理信息科学班", "男生", "19岁", "勤劳勇敢.");

        // 输出学生信息
        stu1.say();
        stu2.say();
        stu3.say();
    }
}